<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>std.file</title>
  <link href="./css/style.css" rel="stylesheet" type="text/css"/>
  <!-- <link href="./img/icon.png" rel="icon" type="image/png"/> -->
  <script type="text/javascript" src="./js/jquery.js"></script>
  <script type="text/javascript" src="./js/modules.js"></script>
  <script type="text/javascript" src="./js/quicksearch.js"></script>
  <script type="text/javascript" src="./js/navigation.js"></script>
  <!--<script type="text/javascript" src="./js/jquery.treeview.js"></script>-->
  <script type="text/javascript">
    var g_moduleFQN = "std.file";
  </script>
  
</head>
<body>
<div id="content">
  <h1><a href="./htmlsrc/std.file.html" class="symbol">std.file</a></h1>
  
<dl>
<dt class="decl">class <a class="symbol _class" name="FileException" href="./htmlsrc/std.file.html#L853" kind="class" beg="853" end="874">FileException</a> : Exception; <a title="Permalink to this symbol" href="#FileException" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L853">#</a></dt>
<dd class="ddef">
<div class="summary"></div>
<dl>
<dt class="decl">uint <a class="symbol _variable" name="FileException.errno" href="./htmlsrc/std.file.html#L856" kind="variable" beg="856" end="856">errno</a>; <a title="Permalink to this symbol" href="#FileException.errno" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L856">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _ctor" name="FileException.this" href="./htmlsrc/std.file.html#L858" kind="ctor" beg="858" end="861">this</a><span class="params">(char[] <em>name</em>)</span>; <a title="Permalink to this symbol" href="#FileException.this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L858">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _ctor" name="FileException.this:2" href="./htmlsrc/std.file.html#L863" kind="ctor" beg="863" end="866">this</a><span class="params">(char[] <em>name</em>, char[] <em>message</em>)</span>; <a title="Permalink to this symbol" href="#FileException.this:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L863">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _ctor" name="FileException.this:3" href="./htmlsrc/std.file.html#L868" kind="ctor" beg="868" end="873">this</a><span class="params">(char[] <em>name</em>, uint <em>errno</em>)</span>; <a title="Permalink to this symbol" href="#FileException.this:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L868">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl">void[] <a class="symbol _function" name="read" href="./htmlsrc/std.file.html#L882" kind="function" beg="882" end="929">read</a><span class="params">(char[] <em>name</em>)</span>; <a title="Permalink to this symbol" href="#read" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L882">#</a></dt>
<dd class="ddef">
<div class="summary">Read a file.</div>
<p class="sec_header">Returns:</p>array of bytes read</dd>
<dt class="decl">void <a class="symbol _function" name="write" href="./htmlsrc/std.file.html#L937" kind="function" beg="937" end="961">write</a><span class="params">(char[] <em>name</em>, void[] <em>buffer</em>)</span>; <a title="Permalink to this symbol" href="#write" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L937">#</a></dt>
<dd class="ddef">
<div class="summary">Write a file.</div>
<p class="sec_header">Returns:</p>0	success</dd>
<dt class="decl">void <a class="symbol _function" name="append" href="./htmlsrc/std.file.html#L968" kind="function" beg="968" end="992">append</a><span class="params">(char[] <em>name</em>, void[] <em>buffer</em>)</span>; <a title="Permalink to this symbol" href="#append" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L968">#</a></dt>
<dd class="ddef">
<div class="summary">Append to a file.</div></dd>
<dt class="decl">void <a class="symbol _function" name="rename" href="./htmlsrc/std.file.html#L999" kind="function" beg="999" end="1006">rename</a><span class="params">(char[] <em>from</em>, char[] <em>to</em>)</span>; <a title="Permalink to this symbol" href="#rename" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L999">#</a></dt>
<dd class="ddef">
<div class="summary">Rename a file.</div></dd>
<dt class="decl">void <a class="symbol _function" name="remove" href="./htmlsrc/std.file.html#L1013" kind="function" beg="1013" end="1017">remove</a><span class="params">(char[] <em>name</em>)</span>; <a title="Permalink to this symbol" href="#remove" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1013">#</a></dt>
<dd class="ddef">
<div class="summary">Delete a file.</div></dd>
<dt class="decl">ulong <a class="symbol _function" name="getSize" href="./htmlsrc/std.file.html#L1024" kind="function" beg="1024" end="1061">getSize</a><span class="params">(char[] <em>name</em>)</span>; <a title="Permalink to this symbol" href="#getSize" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1024">#</a></dt>
<dd class="ddef">
<div class="summary">Get file size.</div></dd>
<dt class="decl">uint <a class="symbol _function" name="getAttributes" href="./htmlsrc/std.file.html#L1068" kind="function" beg="1068" end="1080">getAttributes</a><span class="params">(char[] <em>name</em>)</span>; <a title="Permalink to this symbol" href="#getAttributes" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1068">#</a></dt>
<dd class="ddef">
<div class="summary">Get file attributes.</div></dd>
<dt class="decl">void <a class="symbol _function" name="getTimes" href="./htmlsrc/std.file.html#L1087" kind="function" beg="1087" end="1101">getTimes</a><span class="params">(char[] <em>name</em>, out d_time <em>ftc</em>, out d_time <em>fta</em>, out d_time <em>ftm</em>)</span>; <a title="Permalink to this symbol" href="#getTimes" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1087">#</a></dt>
<dd class="ddef">
<div class="summary">Get creation/access/modified times of file name[].</div>
<p class="sec_header">Throws:</p>FileException on error.</dd>
<dt class="decl">int <a class="symbol _function" name="exists" href="./htmlsrc/std.file.html#L1108" kind="function" beg="1108" end="1123">exists</a><span class="params">(char[] <em>name</em>)</span>; <a title="Permalink to this symbol" href="#exists" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1108">#</a></dt>
<dd class="ddef">
<div class="summary">Does file/directory exist?</div></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest" href="./htmlsrc/std.file.html#L1125" kind="unittest" beg="1125" end="1128">unittest</a>; <a title="Permalink to this symbol" href="#unittest" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1125">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">int <a class="symbol _function" name="isfile" href="./htmlsrc/std.file.html#L1134" kind="function" beg="1134" end="1137">isfile</a><span class="params">(char[] <em>name</em>)</span>; <a title="Permalink to this symbol" href="#isfile" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1134">#</a></dt>
<dd class="ddef">
<div class="summary">Is name a file?</div></dd>
<dt class="decl">int <a class="symbol _function" name="isdir" href="./htmlsrc/std.file.html#L1143" kind="function" beg="1143" end="1146">isdir</a><span class="params">(char[] <em>name</em>)</span>; <a title="Permalink to this symbol" href="#isdir" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1143">#</a></dt>
<dd class="ddef">
<div class="summary">Is name a directory?</div></dd>
<dt class="decl">void <a class="symbol _function" name="chdir" href="./htmlsrc/std.file.html#L1152" kind="function" beg="1152" end="1158">chdir</a><span class="params">(char[] <em>pathname</em>)</span>; <a title="Permalink to this symbol" href="#chdir" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1152">#</a></dt>
<dd class="ddef">
<div class="summary">Change directory.</div></dd>
<dt class="decl">void <a class="symbol _function" name="mkdir" href="./htmlsrc/std.file.html#L1164" kind="function" beg="1164" end="1170">mkdir</a><span class="params">(char[] <em>pathname</em>)</span>; <a title="Permalink to this symbol" href="#mkdir" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1164">#</a></dt>
<dd class="ddef">
<div class="summary">Make directory.</div></dd>
<dt class="decl">void <a class="symbol _function" name="rmdir" href="./htmlsrc/std.file.html#L1176" kind="function" beg="1176" end="1182">rmdir</a><span class="params">(char[] <em>pathname</em>)</span>; <a title="Permalink to this symbol" href="#rmdir" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1176">#</a></dt>
<dd class="ddef">
<div class="summary">Remove directory.</div></dd>
<dt class="decl">char[] <a class="symbol _function" name="getcwd" href="./htmlsrc/std.file.html#L1188" kind="function" beg="1188" end="1201">getcwd</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#getcwd" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1188">#</a></dt>
<dd class="ddef">
<div class="summary">Get current directory.</div></dd>
<dt class="decl">struct <a class="symbol _struct" name="DirEntry" href="./htmlsrc/std.file.html#L1207" kind="struct" beg="1207" end="1285">DirEntry</a>; <a title="Permalink to this symbol" href="#DirEntry" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1207">#</a></dt>
<dd class="ddef">
<div class="summary">Directory Entry</div>
<dl>
<dt class="decl">char[] <a class="symbol _variable" name="DirEntry.name" href="./htmlsrc/std.file.html#L1209" kind="variable" beg="1209" end="1209">name</a>; <a title="Permalink to this symbol" href="#DirEntry.name" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1209">#</a></dt>
<dd class="ddef">
<div class="summary">file or directory name</div></dd>
<dt class="decl">ulong <a class="symbol _variable" name="DirEntry._size" href="./htmlsrc/std.file.html#L1210" kind="variable" beg="1210" end="1210">_size</a>; <a title="Permalink to this symbol" href="#DirEntry._size" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1210">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">d_time <a class="symbol _variable" name="DirEntry._creationTime" href="./htmlsrc/std.file.html#L1211" kind="variable" beg="1211" end="1211">_creationTime</a>; <a title="Permalink to this symbol" href="#DirEntry._creationTime" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1211">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">d_time <a class="symbol _variable" name="DirEntry._lastAccessTime" href="./htmlsrc/std.file.html#L1212" kind="variable" beg="1212" end="1212">_lastAccessTime</a>; <a title="Permalink to this symbol" href="#DirEntry._lastAccessTime" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1212">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">d_time <a class="symbol _variable" name="DirEntry._lastWriteTime" href="./htmlsrc/std.file.html#L1213" kind="variable" beg="1213" end="1213">_lastWriteTime</a>; <a title="Permalink to this symbol" href="#DirEntry._lastWriteTime" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1213">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">ubyte <a class="symbol _variable" name="DirEntry.d_type" href="./htmlsrc/std.file.html#L1214" kind="variable" beg="1214" end="1214">d_type</a>; <a title="Permalink to this symbol" href="#DirEntry.d_type" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1214">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">ubyte <a class="symbol _variable" name="DirEntry.didstat" href="./htmlsrc/std.file.html#L1215" kind="variable" beg="1215" end="1215">didstat</a>; <a title="Permalink to this symbol" href="#DirEntry.didstat" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1215">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">void <a class="symbol _function" name="DirEntry.init" href="./htmlsrc/std.file.html#L1217" kind="function" beg="1217" end="1222">init</a><span class="params">(char[] <em>path</em>, dirent * <em>fd</em>)</span>; <a title="Permalink to this symbol" href="#DirEntry.init" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1217">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">int <a class="symbol _function" name="DirEntry.isdir" href="./htmlsrc/std.file.html#L1224" kind="function" beg="1224" end="1227">isdir</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#DirEntry.isdir" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1224">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">int <a class="symbol _function" name="DirEntry.isfile" href="./htmlsrc/std.file.html#L1229" kind="function" beg="1229" end="1232">isfile</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#DirEntry.isfile" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1229">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">ulong <a class="symbol _function" name="DirEntry.size" href="./htmlsrc/std.file.html#L1234" kind="function" beg="1234" end="1239">size</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#DirEntry.size" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1234">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">d_time <a class="symbol _function" name="DirEntry.creationTime" href="./htmlsrc/std.file.html#L1241" kind="function" beg="1241" end="1246">creationTime</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#DirEntry.creationTime" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1241">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">d_time <a class="symbol _function" name="DirEntry.lastAccessTime" href="./htmlsrc/std.file.html#L1248" kind="function" beg="1248" end="1253">lastAccessTime</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#DirEntry.lastAccessTime" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1248">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">d_time <a class="symbol _function" name="DirEntry.lastWriteTime" href="./htmlsrc/std.file.html#L1255" kind="function" beg="1255" end="1260">lastWriteTime</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#DirEntry.lastWriteTime" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1255">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">void <a class="symbol _function" name="DirEntry.doStat" href="./htmlsrc/std.file.html#L1266" kind="function" beg="1266" end="1284">doStat</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#DirEntry.doStat" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1266">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl">char[][] <a class="symbol _function" name="listdir" href="./htmlsrc/std.file.html#L1292" kind="function" beg="1292" end="1304">listdir</a><span class="params">(char[] <em>pathname</em>)</span>; <a title="Permalink to this symbol" href="#listdir" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1292">#</a></dt>
<dd class="ddef">
<div class="summary">Return contents of directory.</div></dd>
<dt class="decl">char[][] <a class="symbol _function" name="listdir:2" href="./htmlsrc/std.file.html#L1306" kind="function" beg="1306" end="1322">listdir</a><span class="params">(char[] <em>pathname</em>, char[] <em>pattern</em>)</span>; <a title="Permalink to this symbol" href="#listdir:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1306">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">char[][] <a class="symbol _function" name="listdir:3" href="./htmlsrc/std.file.html#L1324" kind="function" beg="1324" end="1340">listdir</a><span class="params">(char[] <em>pathname</em>, RegExp <em>r</em>)</span>; <a title="Permalink to this symbol" href="#listdir:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1324">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">void <a class="symbol _function" name="listdir:4" href="./htmlsrc/std.file.html#L1342" kind="function" beg="1342" end="1350">listdir</a><span class="params">(char[] <em>pathname</em>, bool delegate(char[] filename) <em>callback</em>)</span>; <a title="Permalink to this symbol" href="#listdir:4" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1342">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">void <a class="symbol _function" name="listdir:5" href="./htmlsrc/std.file.html#L1352" kind="function" beg="1352" end="1384">listdir</a><span class="params">(char[] <em>pathname</em>, bool delegate(DirEntry* de) <em>callback</em>)</span>; <a title="Permalink to this symbol" href="#listdir:5" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1352">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">void <a class="symbol _function" name="copy" href="./htmlsrc/std.file.html#L1391" kind="function" beg="1391" end="1496">copy</a><span class="params">(char[] <em>from</em>, char[] <em>to</em>)</span>; <a title="Permalink to this symbol" href="#copy" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1391">#</a></dt>
<dd class="ddef">
<div class="summary">Copy a file. File timestamps are preserved.</div></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:2" href="./htmlsrc/std.file.html#L1502" kind="unittest" beg="1502" end="1523">unittest</a>; <a title="Permalink to this symbol" href="#unittest:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1502">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:3" href="./htmlsrc/std.file.html#L1525" kind="unittest" beg="1525" end="1536">unittest</a>; <a title="Permalink to this symbol" href="#unittest:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.file.html#L1525">#</a></dt>
<dd class="ddef"></dd></dl>
</div>
<div id="footer">
  <p>Copyright © 1999-2008 by Digital Mars ®, All Rights Reserved.</p>
  <p>Page generated by <a href="http://code.google.com/p/dil">dil</a> on Fri Dec 26 03:40:06 2008. Rendered by <a href="http://code.google.com/p/dil/wiki/Kandil">kandil</a>.</p>
</div>
</body>
</html>